package com.xue.utils;

import java.math.BigDecimal;

/**
 * @author xue
 * @create 2022-09-16 17:29
 */
public class LatLonUtil {

    /**
     * 取出小数点后7位的数值
     *
     * @param coordinate
     * @return
     */
    public static Integer translationPoint(Double coordinate) {
        BigDecimal bigDecimalCoordinate = BigDecimal.valueOf(coordinate);
        return bigDecimalCoordinate.subtract(bigDecimalCoordinate.setScale(0, BigDecimal.ROUND_DOWN))
                .multiply(BigDecimal.valueOf(10000000))
                .setScale(0, BigDecimal.ROUND_DOWN).intValue();
    }

}
